package com.szkingdom.kfit.bank.common.util;

import org.junit.Test;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

import static org.junit.Assert.*;

/**
 * @author Lijingyu on 2017/9/21.
 */
public class DateUtilTest {

    @Test
    public void testChgDateFormat() throws Exception {
        Date now = new Date();
        DateFormat dateformat = new SimpleDateFormat("yyyyMMdd");
        String settleDate = dateformat.format(now);
        System.out.println("----->" + settleDate);
        String BeginTime = DateUtil.chgDateFormat(settleDate + "000000", "yyyyMMddHHmmss", "yyyy-MM-dd HH:mm:ss");
        System.out.println(BeginTime);
    }
}